package com.ruoyi.web.enums;

import lombok.Getter;

import java.util.HashMap;
import java.util.Map;

/**
 * 功能类型默认配置CODE
 */
public enum FunctionCodeEnum implements IBaseEnum<Integer> {

    PRODUCT_FX_ID(4, "风吸设备ID"),
    PRODUCT_INSECT_ID(5, "虫情带识别设备ID"),
    ;

    @Getter
    private Integer value;

    @Getter
    private String label;

    FunctionCodeEnum(Integer value, String label) {
        this.value = value;
        this.label = label;
    }

    static  Map<String,String> map = new HashMap<>();

    static {
        for (FunctionCodeEnum value : FunctionCodeEnum.values()) {
            map.put(value.getLabel(),value.name());
        }
    }

    /**
     * @desc  得到枚举映射的MAP
     * @author fwx 2023/10/17 16:37
     **/
    public static Map<String,String> getDescMap(){
        return map;
    }
}
